<html>

<head>
    
  <script type="text/javascript" src="../../Scripts/jquery.js">
  </script>
    
  <script type="text/javascript" src="../../Scripts/SyntaxHighlighter/scripts/shCore.js">
  </script>
    
  <script type="text/javascript" src="../../Scripts/SyntaxHighlighter/scripts/shBrushDelphi.js">
  </script>
    
  <script type="text/javascript" src="../../Scripts/SyntaxHighlighter/scripts/shBrushCpp.js">
  </script>
    
  <script type="text/javascript" src="../../Scripts/SyntaxHighlighter/scripts/shBrushCSharp.js">
  </script>
    
  <link type="text/css" rel="stylesheet" href="../../Scripts/SyntaxHighlighter/styles/shCoreDefault.css">
    
  <link type="text/css" rel="stylesheet" href="../../Scripts/SyntaxHighlighter/styles/shThemeDefault.css">
  

  <title>Overview</title>

  <link rel="stylesheet" href="../../Styles/default.css" type="text/css">

  <meta name="keywords" content="clipper,clipping,clip,intersection,union,polygon,offset,library,algorithm,line">

    
  <script type="text/javascript" src="../../Scripts/bootstrap.js">
  </script>
  
</head>

<body bgcolor="#FFFFFF">
    
  <!-- THIS FILE HAS BEEN AUTOMATICALLY PROCESSED FROM A SOURCE COPY -->
    
  <!-- DO NOT EDIT MANUALLY !!! -->
  
  <table class="Banner" cellspacing="0" cellpadding="0" border="1" bordercolorlight="#303080" bordercolordark="#7070B0">
    <tr>
      <td class="Banner" nowrap=""><a href="../_Body.htm" class="Banner"><img src="../../Images/_Home.gif" align="absmiddle">Home</a>
      </td>
      <td class="Banner" width="100%" align="right"><img src="../../Images/_Project_Logo.gif" align="absmiddle">
      </td>
    </tr>
  </table>
  <h1>Overview</h1>


  <p class="Body"> The <a href="../_Body.htm"><b>Clipper Library</b></a> performs <b><a href="../Units/ClipperLib/Types/ClipType.htm">clipping</a></b>, and <a href="../Units/ClipperLib/Classes/ClipperOffset/_Body.htm"><b>offsetting</b></a> of both lines and polygons.<br><br> A number of features set Clipper apart from other clipping libraries: 
    <ul>	
	  
      <li>it accepts all types of polygons including self-intersecting ones</li>
    
      <li>it supports multiple polygon filling rules (EvenOdd, NonZero, Positive, Negative)</li>
    
      <li>it's very fast relative to <a href="http://www.angusj.com/delphi/clipper.php#features" target="_blank">other libraries</a></li>
	  
      <li>it's <a href="http://www.mpi-inf.mpg.de/~kettner/pub/nonrobust_cgta_06.pdf" target="_blank">numerically robust</a></li>
	  
      <li>it also performs line and polygon offsetting</li>
    
      <li>it's free to use in both freeware and commercial applications</li>

    </ul> <br> </p>


  <p class="Body"> <b>Current Version:</b> 6.2.1<br><br> <b>Author &amp; copyright:</b><br> Angus Johnson. Copyright &copy; 2010-2014<br> License, terms and conditions: <a href="./License.htm">Boost Software License</a><br><br> </p>


  <p class="Body" id="terminology"> <img src="../../Images/int.png" alt="" border="0" align="right"> <b>Terminology:</b><br> 
    <ul>
  
      <li><b>Clipping:</b> commonly refers to the process of cutting away from a set of 2-dimensional geometric shapes those parts that are outside a rectangular '<em>clipping</em>' window. This can be achieved by <em>intersecting</em> subject paths (lines and polygons) with a clipping rectangle. In a more general sense, the clipping window need not be rectangular but can be any type of polygon, even multiple polygons. Also, while clipping typically refers to an <em>intersection</em> operation, in this documentation it will refer to any one of the <a href="../Units/ClipperLib/Types/ClipType.htm">four boolean operations</a> (intersection, union, difference and exclusive-or).</li>
	
      <li><b>Path:</b> is an ordered sequence of vertices defining a single geometric contour that's either a line (an open path) or a polygon (a closed path).</li> 
  
      <li><b>Line:</b> or polyline is an <em>open</em> path containing 2 or more vertices.</li>
  
      <li><b>Polygon:</b> commonly refers to a two-dimensional region bounded by an outer non-intersecting closed contour. That region may also contain a number of 'holes'. In this documentation however, polygon will simply refer to a <em>closed</em> path.</li>
  
      <li><b>Contour:</b> synonymous with path.</li>
	
      <li><b>Hole:</b> is a closed region within a polygon that's not part of the polygon. A 'hole polygon' is a closed path that forms the outer boundaries of a hole.</li>
   
      <li><b>Polygon Filling Rule:</b> the <a href="../Units/ClipperLib/Types/PolyFillType.htm"><b>filling rule</b></a>, together with a list of closed paths, defines those regions (bounded by paths) that are <em>inside</em> (ie regions 'brush filled' in a graphical display) and those which are <em>outside</em> (ie 'holes').</li>

    </ul><br> </p>


  <p class="Body"> <b>Distribution package contents:</b><br><br> The ZIP package contains the Clipper library's source code, a Windows CHM help file, HTML help, and a number of compiled demo applications (with full source code). The library was initially written in <strong>Delphi Pascal</strong> (and compiles with Delphi version 7 or above) but now contains <strong>C++</strong>, <strong>C#</strong> and <strong>Python</strong> translations too. The library's source code in each language is about 5000 lines. The Delphi code contains reasonably extensive comments, but comments are fewer in the C++ and C# code. The included sample applications show how Clipper can be used with the different languages using a number of graphics display libraries including - <b>AGG, Cairo, OpenGL, Graphics32, GDI+</b> and <b>SVG</b>.<br><br> <b>Download Link:</b><br><br> <a href="http://sourceforge.net/projects/polyclipping">SourceForge</a><br><br> <b>References:</b><br><br> The Library is based on but significantly extends Bala Vatti's polygon clipping algorithm as described in <a href="http://portal.acm.org/citation.cfm?id=129906" target="_blank">"A generic solution to polygon clipping"</a>, Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63.<br><br> A section in <a href="http://books.google.com/books?q=vatti+clipping+agoston" target="_blank">"Computer graphics and geometric modeling: implementation and algorithms"</a> by By Max K. Agoston (Springer, 2005) discussing <em>Vatti Polygon Clipping</em> was also helpful in creating the initial Clipper implementation.<br><br> The paper titled <a href="http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf">"Polygon Offsetting by Computing Winding Numbers"</a> by Chen & McMains (Paper no. DETC2005-85513, ASME 2005. Pages 565-575) contains helpful discussion on the complexities of polygon offsetting together with some solutions.<br><br>  </p>
      

  <h2 id="Auto-SeeAlso">See Also</h2>
  <p class="Body"><a href="../_Body.htm">Source</a>, <a href="License.htm">License</a>, <a href="../Units/ClipperLib/Classes/Clipper/_Body.htm">Clipper</a>, <a href="../Units/ClipperLib/Classes/ClipperOffset/_Body.htm">ClipperOffset</a>, <a href="../Units/ClipperLib/Types/ClipType.htm">ClipType</a>, <a href="../Units/ClipperLib/Types/PolyFillType.htm">PolyFillType</a></p>
    
  <p class="Copyright" id="auto"> <br><br> Copyright &copy;2010-2014 Angus Johnson&nbsp; - &nbsp; Clipper 6.2.1 &nbsp; - &nbsp; Help file built on 1-November-2014 <br><br> </p>
  
</body>


</html>